using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._RelationshipClasses
{
    /// <summary>
    /// <para>Set Relationship Class Split Policy</para>
    /// <para>Defines the split policy for related features.</para>
    /// <para>定义相关功能的拆分策略。</para>
    /// </summary>    
    [DisplayName("Set Relationship Class Split Policy")]
    public class SetRelationshipClassSplitPolicy : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetRelationshipClassSplitPolicy()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_rel_class">
        /// <para>Input Relationship Class</para>
        /// <para>The relationship class on which the split policy will be set. The origin feature class must be a polyline or polygon feature class and the destination must be a nonspatial table.</para>
        /// <para>将设置拆分策略的关系类。原要素类必须是折线或面要素类，目标必须是非空间表。</para>
        /// </param>
        /// <param name="_split_policy">
        /// <para>Split Policy</para>
        /// <para><xdoc>
        ///   <para>Specifies the split policy to apply to the relationship class.</para>
        ///   <bulletList>
        ///     <bullet_item>Default (composite)— If the feature class split model is Delete/Insert/Insert, the relationships and the part objects will be deleted. If the feature class split model is Update/Insert, the relationships on the largest resulting feature will be preserved. This is the default split policy for composite relationship classes.</bullet_item><para/>
        ///     <bullet_item>Default (simple)— The relationships on the largest resulting feature will be preserved. This is the default split policy for simple relationship classes.</bullet_item><para/>
        ///     <bullet_item>Duplicate related objects—Copies of the related objects will be generated and assigned to both resulting parts. The relationship class must be Global ID based to use this split policy.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要应用于关系类的拆分策略。</para>
        ///   <bulletList>
        ///     <bullet_item>默认（复合）- 如果要素类分割模型为删除/插入/插入，则将删除关系和零件对象。如果要素类分割模型为更新/插入，则将保留最大生成要素上的关系。这是复合关系类的默认拆分策略。</bullet_item><para/>
        ///     <bullet_item>默认（简单）- 将保留最大生成要素上的关系。这是简单关系类的默认拆分策略。</bullet_item><para/>
        ///     <bullet_item>复制相关对象 - 将生成相关对象的副本并将其分配给两个生成的零件。关系类必须基于全局 ID 才能使用此拆分策略。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public SetRelationshipClassSplitPolicy(object _in_rel_class, _split_policy_value? _split_policy)
        {
            this._in_rel_class = _in_rel_class;
            this._split_policy = _split_policy;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Set Relationship Class Split Policy";

        public override string CallName => "management.SetRelationshipClassSplitPolicy";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_rel_class, _split_policy.GetGPValue(), _out_rel_class];

        /// <summary>
        /// <para>Input Relationship Class</para>
        /// <para>The relationship class on which the split policy will be set. The origin feature class must be a polyline or polygon feature class and the destination must be a nonspatial table.</para>
        /// <para>将设置拆分策略的关系类。原要素类必须是折线或面要素类，目标必须是非空间表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Relationship Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_rel_class { get; set; }


        /// <summary>
        /// <para>Split Policy</para>
        /// <para><xdoc>
        ///   <para>Specifies the split policy to apply to the relationship class.</para>
        ///   <bulletList>
        ///     <bullet_item>Default (composite)— If the feature class split model is Delete/Insert/Insert, the relationships and the part objects will be deleted. If the feature class split model is Update/Insert, the relationships on the largest resulting feature will be preserved. This is the default split policy for composite relationship classes.</bullet_item><para/>
        ///     <bullet_item>Default (simple)— The relationships on the largest resulting feature will be preserved. This is the default split policy for simple relationship classes.</bullet_item><para/>
        ///     <bullet_item>Duplicate related objects—Copies of the related objects will be generated and assigned to both resulting parts. The relationship class must be Global ID based to use this split policy.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要应用于关系类的拆分策略。</para>
        ///   <bulletList>
        ///     <bullet_item>默认（复合）- 如果要素类分割模型为删除/插入/插入，则将删除关系和零件对象。如果要素类分割模型为更新/插入，则将保留最大生成要素上的关系。这是复合关系类的默认拆分策略。</bullet_item><para/>
        ///     <bullet_item>默认（简单）- 将保留最大生成要素上的关系。这是简单关系类的默认拆分策略。</bullet_item><para/>
        ///     <bullet_item>复制相关对象 - 将生成相关对象的副本并将其分配给两个生成的零件。关系类必须基于全局 ID 才能使用此拆分策略。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Policy")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _split_policy_value? _split_policy { get; set; }

        public enum _split_policy_value
        {
            /// <summary>
            /// <para>Duplicate related objects</para>
            /// <para>Duplicate related objects—Copies of the related objects will be generated and assigned to both resulting parts. The relationship class must be Global ID based to use this split policy.</para>
            /// <para>复制相关对象 - 将生成相关对象的副本并将其分配给两个生成的零件。关系类必须基于全局 ID 才能使用此拆分策略。</para>
            /// </summary>
            [Description("Duplicate related objects")]
            [GPEnumValue("DUPLICATE_RELATED_OBJECTS")]
            _DUPLICATE_RELATED_OBJECTS,

            /// <summary>
            /// <para>Default (simple)</para>
            /// <para>Default (simple)— The relationships on the largest resulting feature will be preserved. This is the default split policy for simple relationship classes.</para>
            /// <para>默认（简单）- 将保留最大生成要素上的关系。这是简单关系类的默认拆分策略。</para>
            /// </summary>
            [Description("Default (simple)")]
            [GPEnumValue("DEFAULT_SIMPLE")]
            _DEFAULT_SIMPLE,

            /// <summary>
            /// <para>Default (composite)</para>
            /// <para>Default (composite)— If the feature class split model is Delete/Insert/Insert, the relationships and the part objects will be deleted. If the feature class split model is Update/Insert, the relationships on the largest resulting feature will be preserved. This is the default split policy for composite relationship classes.</para>
            /// <para>默认（复合）- 如果要素类分割模型为删除/插入/插入，则将删除关系和零件对象。如果要素类分割模型为更新/插入，则将保留最大生成要素上的关系。这是复合关系类的默认拆分策略。</para>
            /// </summary>
            [Description("Default (composite)")]
            [GPEnumValue("DEFAULT_COMPOSITE")]
            _DEFAULT_COMPOSITE,

        }

        /// <summary>
        /// <para>Output Relationship Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Relationship Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_rel_class { get; set; }


        public SetRelationshipClassSplitPolicy SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}